import request from '@/utils/request'

// 查询专业信息列表
export function listBSubject(query) {
  return request({
    url: '/basedata/bsubject/list',
    method: 'get',
    params: query
  })
}

export function getSubjectListAll() {
    return request({
        url: '/basedata/bsubject/listAll',
        method: 'get'
    })
}

export function createOrUpdateSubject(data) {
    return request({
        url: '/basedata/bsubject/createOrUpdateSubject',
        method: 'post',
        data: data
    })
}

export function delBSubject(id) {
    return request({
      url: '/basedata/bsubject/deleteById/' + id,
      method: 'delete'
    })
}

export function changeBSubjectStatus(subjectId, status) {
    const params = {
      status
    }
    return request({
      url: '/basedata/bsubject/update/status/' + subjectId,
      method: 'put',
      params: params
    })
  }